home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7859 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: mudskipper.cac.psu.edu!user
  2. From: fcusack@tdx.org (frank.)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Diff between const str& and const str*
  5. Date: Mon, 19 Feb 1996 07:37:05 -0400
  6. Organization: Psychic Enemies Network
  7. Message-ID: <fcusack-1902960737050001@mudskipper.cac.psu.edu>
  8. References: <4g93d4$ej4@newsstand.cit.cornell.edu>
  9. NNTP-Posting-Host: mudskipper.cac.psu.edu
  10.  
  11. In article <4g93d4$ej4@newsstand.cit.cornell.edu>, wo10@cornell.edu
  12. (Warren Ouyang) wrote:
  13.  
  14. > Hello all, I was wondering... in C++, is there a difference between 
  15. > "const str&" and "const str*" as function parameters?  (str is a class).  
  16. > Thanks for any help!
  17.  
  18. One is a pointer (*), one is a reference (&). :) But you knew that...
  19. In your function, you will have to deal with that parameter differently
  20. based on it's type...
  21. ~Frank
  22.  -- I am Pentium of Borg.  Division is futile.  You will be approximated. --
  23.  --   If you build it, they will come --> http://www.tdx.org/~fcusack/    --
  24.  -- PGP key fingerprint: 01 C0 C0 B9 CC 78 67 0F  3F 64 80 65 8B 0F F9 EA --
  25.